package emon.eline.manage.media.api;

import emon.eline.manage.media.dto.CheckChunkResult;
import emon.eline.model.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.multipart.MultipartFile;

@Api(tags = "媒资管理接口")
public interface MediaUploadControllerApi {
    // 上传文件
    @ApiOperation("文件上传接口")
    ResponseResult register(String fileMd5,
                            String fileName,
                            Long fileSize,
                            String mimetype,
                            String fileExt);

    @ApiOperation("校验分块文件是否存在")
    CheckChunkResult checkchunk(String fileMd5, Integer chunk, Integer chunkSize);


    // 上传文件
    @ApiOperation("上传分块")
    ResponseResult uploadchunk(MultipartFile file, String fileMd5, Integer chunk);

    // 合并分块
    @ApiOperation("上传分块")
    ResponseResult mergechunks(String fileMd5,
                               String fileName,
                               Long fileSize,
                               String mimetype,
                               String fileExt);
}
